package com.stu.mapper;

import com.stu.pojo.Permission;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper{
    @Select("SELECT permission.* FROM role,permission,sys_role_permission WHERE role.rid=sys_role_permission.rid AND sys_role_permission.pid=permission.pid AND role.name=#{name}")
    @ResultType(Permission.class)
    List<Permission> selectPermissionsByRoleName(String rname);
}
